home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / f90 / matmul.z / matmul
Encoding:
Text File  |  2002-10-03  |  4.3 KB  |  99 lines

  1. MATMUL(3I)                                            Last changed: 4-13-99
  2.  
  3.  
  4. NNAAMMEE
  5.      MMAATTMMUULL - Performs matrix multiplication of numeric or logical matrices
  6.  
  7. SSYYNNOOPPSSIISS
  8.      MMAATTMMUULL (([MMAATTRRIIXX__AA==]_m_a_t_r_i_x__a,, [MMAATTRRIIXX__BB==]_m_a_t_r_i_x__b))
  9.  
  10. IIMMPPLLEEMMEENNTTAATTIIOONN
  11.      UNICOS, UNICOS/mk, IRIX systems
  12.  
  13.      CF90, MIPSpro 7 Fortran 90
  14.  
  15. SSTTAANNDDAARRDDSS
  16.      Fortran
  17.  
  18. DDEESSCCRRIIPPTTIIOONN
  19.      The MMAATTMMUULL intrinsic function performs matrix multiplication
  20.      operations on numeric or logical matrices.  It accepts the following
  21.      arguments:
  22.  
  23.      _m_a_t_r_i_x__a  Must be of numeric type (integer, real, or complex) or of
  24.                logical type.  It must be array valued and of rank one or
  25.                two.
  26.  
  27.      _m_a_t_r_i_x__b  Must be of numeric type if _m_a_t_r_i_x__a is of numeric type and
  28.                of logical type if _m_a_t_r_i_x__a is of logical type.  It must be
  29.                array valued and of rank one or two.  If _m_a_t_r_i_x__a has rank
  30.                one, _m_a_t_r_i_x__b must have rank two.  If _m_a_t_r_i_x__b has rank one,
  31.                _m_a_t_r_i_x__a must have rank two.  The size of the first (or
  32.                only) dimension of _m_a_t_r_i_x__b must equal the size of the last
  33.                (or only) dimension of _m_a_t_r_i_x__a.
  34.  
  35.      MMAATTMMUULL is a transformational function.  The name of this intrinsic
  36.      cannot be passed as an argument.
  37.  
  38. RREETTUURRNN VVAALLUUEESS
  39.      The result type, type parameter, and shape are as follows.  If the
  40.      arguments are of numeric type, the type and kind type parameter of the
  41.      result are determined by the types of the arguments.  If the arguments
  42.      are of type logical, the result is of type logical with the kind type
  43.      parameter of the arguments.  The shape of the result depends on the
  44.      shapes of the arguments, as follows:
  45.  
  46.      * If _m_a_t_r_i_x__a has shape (_n, _m) and _m_a_t_r_i_x__b has shape (_m, _k), the
  47.        result has shape (_n, _k).
  48.  
  49.      * If _m_a_t_r_i_x__a _h_a_s _s_h_a_p_e (_m) and _m_a_t_r_i_x__b has shape (_m, _k), the result
  50.        has shape (_k).
  51.  
  52.      * If _m_a_t_r_i_x__a has shape (_n, _m) and _m_a_t_r_i_x__b has shape (_m), the result
  53.        has shape (_n).
  54.  
  55.      Element (_i, _j) of the result has the value
  56.      SSUUMM((MMAATTRRIIXX__AA((_i,,::))**MMAATTRRIIXX__BB((::,,_j)))) if the arguments are of numeric type
  57.      and has the value AANNYY((MMAATTRRIIXX__AA((_i,,::))..AANNDD..MMAATTRRIIXX__BB((::,,_j)))) if the
  58.      arguments are of logical type.
  59.  
  60.      Element (_j) of the result has the value SSUUMM((MMAATTRRIIXX__AA((::))**MMAATTRRIIXX__BB((::,,_j))))
  61.      if the arguments are of numeric type and has the value
  62.      AANNYY((MMAATTRRIIXX__AA((::))..AANNDD..MMAATTRRIIXX__BB((::,,_j)))) if the arguments are of logical
  63.      type.
  64.  
  65.      Element (_i) of the result has the value SSUUMM((MMAATTRRIIXX__AA((_i,,::))**MMAATTRRIIXX__BB((::))))
  66.      if the arguments are of numeric type and has the value
  67.      AANNYY((MMAATTRRIIXX__AA((_i,,::))..AANNDD..MMAATTRRIIXX__BB((::)))) if the arguments are of logical
  68.      type.
  69.  
  70. EEXXAAMMPPLLEESS
  71.      Let AA and BB be the matrices
  72.  
  73.      | 1 2 3 |
  74.      | 2 3 4 |
  75.  
  76.      and
  77.  
  78.      | 1 2 |
  79.      | 2 3 |
  80.      | 2 4 |
  81.  
  82.      Let XX and YY be the vectors [[11,, 22]] and [[11,, 22,, 33]].
  83.  
  84.      The result of MMAATTMMUULL((AA,, BB)) is the matrix-matrix product AABB with the
  85.      value
  86.  
  87.      | 11 20 |
  88.      | 16 29 |
  89.  
  90.      The result of MMAATTMMUULL((XX,, AA)) is the vector-matrix product XXAA with the
  91.      value [[55,, 88,, 1111]].
  92.  
  93.      The result of MMAATTMMUULL((AA,, YY)) is the matrix-vector product AAYY with the
  94.      value [[1144,, 2200]].
  95.  
  96. SSEEEE AALLSSOO
  97.      _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l for the printed version of this
  98.      man page.
  99.